<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
> arc2warc </TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE=" warc-tools version 0.17  A library for data archiving "
HREF="index.html"><LINK
REL="UP"
TITLE=" Detailed utilisation "
HREF="c126.html"><LINK
REL="PREVIOUS"
TITLE=" Detailed utilisation "
HREF="c126.html"><LINK
REL="NEXT"
TITLE=" warcfilter "
HREF="x174.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>warc-tools version 0.17  A library for data archiving</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c126.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Detailed utilisation</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x174.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="AEN145"
>3.2. arc2warc</A
></H1
><P
>&#13;		The  option -a is mandatory when we use arc2warc. It is used to indicate the name of the ARC file to convert.
        </P
><P
>&#13;        The option -f is mandatory. It must be followed by the name of the output WARC file.
        </P
><P
>&#13;        The option -c is optional. If you use -c, the resulting WARC file is generated compressed following the gzip format.
		By default, the WARC file is not generated commpressed. The WARC file mode of
        compression is independent of ARC file mode of compression, the user has to
        choose the method of compression.
        </P
><P
>&#13;		The option -t is optional it allows to give the application work directory for temporary files creation.
	    By default worker directory is the current one.
        </P
><P
>&#13;        For the generation of an uncompressed WARC file <TT
CLASS="filename"
>"file.warc"</TT
> from an ARC file <TT
CLASS="filename"
>"file.arc"</TT
>, we can use
        the following command shown in this example :
        </P
><DIV
CLASS="example"
><A
NAME="AEN154"
></A
><P
><B
>Example 3-3.  How to use the arc2warc command for the conversion of an ARC file into an uncompressed WARC file.</B
></P
><PRE
CLASS="screen"
>&#13;<SAMP
CLASS="prompt"
>mohamed@mohamed-desktop:~$ </SAMP
><KBD
CLASS="userinput"
>arc2warc -a file.arc -f file.warc -t /tmp/</KBD
>
        </PRE
></DIV
><P
>&#13;        For the generation of a compressed WARC file <TT
CLASS="filename"
>"file.warc.gz"</TT
>"from the same ARC file :
        </P
><DIV
CLASS="example"
><A
NAME="AEN161"
></A
><P
><B
>Example 3-4.  How to use the arc2warc command for the conversion of an ARC file into a compressed WARC file. </B
></P
><PRE
CLASS="screen"
>&#13;<SAMP
CLASS="prompt"
>mohamed@mohamed-desktop:~$ </SAMP
><KBD
CLASS="userinput"
>arc2warc -a file.arc -f file.warc -t /tmp/ -c</KBD
>
        </PRE
></DIV
><P
>&#13;        arc2warc.sh is shell script used to convert all ARC files in a directory to WARC files.
        The option of this command are similar to the arc2warc options, except that  the option
        -d  is added to indicates the directory where the ARC file are stored. We do not use  -f and -a options in this case.
		The resulting WARC files will have the same names of their origin ARC file but with the extension ".warc" instead of ".arc".
		In the case when we reclaim a compressed output, the extension ".gz" will be added to the end of each WARC file name.
        </P
><P
>&#13;        An example of utilisation of this command while passing the directory <TT
CLASS="filename"
>"/tmp/file"</TT
> as input is :
        </P
><DIV
CLASS="example"
><A
NAME="AEN169"
></A
><P
><B
>Example 3-5.  How to use arc2warc.sh command. </B
></P
><PRE
CLASS="screen"
>&#13;<SAMP
CLASS="prompt"
>mohamed@mohamed-desktop:~$ </SAMP
><KBD
CLASS="userinput"
>arc2warc.sh -d /tmp/file -t /tmp/</KBD
>
        </PRE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c126.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x174.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Detailed utilisation</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c126.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>warcfilter</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>